oh-my-posh themes
A modified theme based on the oh-my-posh pure theme, which only adds python environment display. To use it, just add notepad $profile
, and then add one line
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH/pure.omp.json"| Invoke-Expression
.
Use Powshell 7 is a good option by the way.
Posh
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "#BF616A",
"style": "plain",
"template": "{{ .UserName }} ",
"type": "session"
},
{
"foreground": "#81A1C1",
"properties": {
"style": "full"
},
"style": "plain",
"template": "{{ .Path }} ",
"type": "path"
},
{
"style": "diamond",
"properties": {
"fetch_virtual_env": true,
"display_mode": "environment",
"home_enabled": true,
"display_virtual_env": true,
"display_default": true
},
"template": "({{ .Venv }})",
"type": "python"
}
],
"type": "prompt"
},
{
"alignment": "left",
"segments": [
{
"foreground": "#6C6C6C",
"properties": {
"branch_ahead_icon": "<#88C0D0>\u21e1 </>",
"branch_behind_icon": "<#88C0D0>\u21e3 </>",
"branch_icon": "",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"github_icon": ""
},
"style": "plain",
"template": "{{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }}<#FFAFD7>*</>{{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "left",
"segments": [
{
"foreground": "darkGray",
"style": "plain",
"template": "[{{ .CurrentDate | date .Format }}]",
"type": "time"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#B48EAD",
"foreground_templates": [
"{{ if gt .Code 0 }}#BF616A{{ end }}"
],
"properties": {
"always_enabled": true
},
"style": "plain",
"template": "\u276f ",
"type": "status"
}
],
"type": "prompt"
}
],
"console_title_template": "{{if .Root}}(Admin){{end}} {{.PWD}}",
"transient_prompt": {
"foreground": "#B48EAD",
"foreground_templates": [
"{{ if gt .Code 0 }}#BF616A{{ end }}"
],
"template": "\u276f "
},
"version": 2
}
Wholespace
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"style": "diamond",
"properties": {
"fetch_virtual_env": true,
"display_mode": "environment",
"home_enabled": true,
"display_virtual_env": true,
"display_default": true
},
"template": "({{ .Venv }})",
"type": "python"
},
{
// "background": "#575656",
"foreground": "green",
// "leading_diamond": "\ue0b2",
"properties": {
"macos": "\uf179 ",
"ubuntu": "\uf31b ",
"windows": "\ue62a "
},
"style": "diamond",
"template": " {{ if .WSL }}WSL at {{ end }}{{.Icon}}|",
// "trailing_diamond": "\ue0b0",
"type": "os"
},
{
"foreground": "lightYellow",
"properties": {
"folder_icon": "\uf07b",
"home_icon": "home",
"style": "agnoster_full"
},
"style": "diamond",
"template": " \ue5ff {{ .Path }} ",
"type": "path"
},
{
// "background": "#575656",
"foreground": "#579ebe",
// "leading_diamond": "\ue0b0",
"style": "diamond",
"template": "[CPU: {{ round .PhysicalPercentUsed .Precision }}% | ",
"type": "sysinfo"
},
{
// "background": "#575656",
"foreground": "#579ebe",
"style": "diamond",
"template": "RAM: {{ (div ((sub .PhysicalTotalMemory .PhysicalFreeMemory)|float64) 1073741824.0) }}/{{ (div .PhysicalTotalMemory 1073741824.0) }}GB]",
// "trailing_diamond": "\ue0b0",
"type": "sysinfo"
},
{
// "background": "#575656",
"foreground": "darkGray",
// "leading_diamond": "\ue0b2",
"properties": {
"style": "roundrock",
"threshold": 0
},
"style": "diamond",
"template": " in [{{ .FormattedMs }}]",
// "trailing_diamond": "\ue0b0",
"type": "executiontime"
}
],
"type": "prompt"
},
{
"alignment": "right",
"segments": [
{
"background": "#ffffff",
"foreground": "#000000",
"leading_diamond": "\ue0b2",
"properties": {
"fetch_package_manager": true,
"npm_icon": " <#cc3a3a>\ue5fa</> ",
"yarn_icon": " <#348cba>\ue6a7</>"
},
"style": "diamond",
"template": "\ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }}",
"trailing_diamond": "<transparent,#ffffff>\ue0b2</>",
"type": "node"
},
{
"background": "#17D7A0",
"foreground": "#011627",
"leading_diamond": "\ue0b2",
"properties": {
"branch_icon": "\ue725 ",
"fetch_stash_count": true,
"fetch_status": true,
"fetch_upstream_icon": true,
"fetch_worktree_count": true
},
"style": "diamond",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b0",
"type": "git"
}
],
"type": "prompt"
},
{
"alignment": "left",
"newline": true,
"segments": [
{
// "background": "darkGray",
"foreground": "darkGray",
// "leading_diamond": "\ue0b2",
"properties": {
"time_format": "15:04:05"
},
"style": "diamond",
"template": "[{{ .CurrentDate | date .Format }}] ",
// "trailing_diamond": "\ue0b0",
"type": "time"
},
{
"foreground": "darkGray",
"foreground_templates": ["{{ if gt .Code 0 }}#ff0000{{ end }}"],
"properties": {
"always_enabled": true
},
"style": "plain",
// "template": " \ueb05 ",
"template": "> ",
"type": "status"
}
],
"type": "prompt"
}
],
"console_title_template": "{{ .Folder }}",
"transient_prompt": {
"background": "transparent",
"foreground": "#FEF5ED",
"template": "\ue285 "
},
"version": 2
}